/*
** Copyright (C) 2009 Joshua Brent Marsh <joshua@icub3d.com>
**  
** This file is part of icub3d-adt.
**
** icub3d-adt is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 3 of the License, or
** (at your option) any later version.
**  
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**  
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**  
*/

/* $Id: logger.c 53 2009-12-24 20:43:05Z joshua@icub3d.com $ */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "logger.h"

/*******************************************************************************
 * Library Definitions.
 ******************************************************************************/
void
logger_init (const char *ident, int option, int facility)
{
  /* We are just using the system logging. */
  openlog (ident, option, facility);
}

void 
logger_log(int priority, const char *format, ...)
{
  va_list args;

  /* Use the va_list version. */
  va_start (args, format);
  logger_vlog (priority, format, args);
  va_end (args);
}

void
logger_vlog(int priority, const char *format, va_list args)
{
  /* We are just using the system logging. */
  vsyslog (priority, format, args);
}

void
logger_close()
{
  /* We are just using the system logging. */
  closelog();
}

